#include "stdafx.h"

DESCRIPTION_10_TEST_SUITE_CTOR(InputElementDescription, ("POSITION"))

BOOST_FIXTURE_TEST_CASE(Default, TestInputElementDescription)
{
	BOOST_REQUIRE_EQUAL(std::string("POSITION"), m_desc.SemanticName);
	BOOST_REQUIRE_EQUAL(DXGI_FORMAT_UNKNOWN, m_desc.Format);
	BOOST_REQUIRE_EQUAL(0, m_desc.InputSlot);
	BOOST_REQUIRE_EQUAL(D3D10_APPEND_ALIGNED_ELEMENT, m_desc.AlignedByteOffset);
}

BOOST_FIXTURE_TEST_CASE(SemanticName_, TestInputElementDescription)
{
	LPCSTR semanticName = m_desc.SemanticName_("TEXCOORD0").SemanticName;
	BOOST_REQUIRE_EQUAL(std::string("TEXCOORD0"), semanticName);
}

#define INPUT_ELEMENT_DESCRIPTION_TEST_CASE(type_, name_, value_) \
	DESCRIPTION_10_TEST_CASE(type_, name_, value_, InputElementDescription)

INPUT_ELEMENT_DESCRIPTION_TEST_CASE(DXGI_FORMAT, Format, DXGI_FORMAT_R8G8B8A8_UINT)
INPUT_ELEMENT_DESCRIPTION_TEST_CASE(UINT, SemanticIndex, 2)
INPUT_ELEMENT_DESCRIPTION_TEST_CASE(UINT, InputSlot, 2)
INPUT_ELEMENT_DESCRIPTION_TEST_CASE(UINT, AlignedByteOffset, 2)

BOOST_AUTO_TEST_SUITE_END()
